<template>
	<view class="__svg" :class="{'action': show}" id="__svg-zan" :style="{width: size + 'px',height: size + 'px'}">
	</view>
	
</template>

<script>
	export default {
		props: {
			show: {
				type: Boolean,
				default: false
			},
			size: {
				type: String,
				default: 'auto'
			},
		},
		data() {
			return {

			}
		},
		methods: {

		}
	}
</script>
<script module="svgs" lang="renderjs">
	export default {
		mounted() {
			if (typeof window.svgs === 'function') {
				this.initSvgs()
			} else {
				// 动态引入较大类库避免影响页面展示
				const script = document.createElement('script')
				// view 层的页面运行在 www 根目录，其相对路径相对于 www 计算
				script.src = 'static/svg.js'
				script.onload = this.initsvg.bind(this)
				document.head.appendChild(script)
			}
		},
		methods: {
			initsvg: function(e) {
				var svg = SVG().addTo('#__svg-zan');
				svg.attr({
					viewBox: '0 0 1024 1024',
				});
				svg.path(
					'M616.7 144.2a2.3 12.2 0 1 0 4.6 0 2.3 12.2 0 1 0-4.6 0Z M627.571704 142.656012a12.2 2.3 60 1 0 3.983717-2.3 12.2 2.3 60 1 0-3.983717 2.3Z M636.311797 135.919689a12.2 2.3 30 1 0 2.3-3.983717 12.2 2.3 30 1 0-2.3 3.983717Z M628.3 123.4a12.2 2.3 0 1 0 24.4 0 12.2 2.3 0 1 0-24.4 0Z M627.328131 118.880268a2.3 12.2 60 1 0 21.13102-12.2 2.3 12.2 60 1 0-21.13102 12.2Z M624.189866 115.445957a2.3 12.2 30 1 0 12.2-21.131019 2.3 12.2 30 1 0-12.2 21.131019Z M617.4 101.9a2.3 12.2 0 1 0 4.6 0 2.3 12.2 0 1 0-4.6 0Z M607.088802 105.649823a12.2 2.3 60 1 0 3.983717-2.3 12.2 2.3 60 1 0-3.983717 2.3Z M600.042483 114.130839a12.2 2.3 30 1 0 2.3-3.983717 12.2 2.3 30 1 0-2.3 3.983717Z M586 122.6a12.2 2.3 0 1 0 24.4 0 12.2 2.3 0 1 0-24.4 0Z M590.235205 139.41267a2.3 12.2 60 1 0 21.13102-12.2 2.3 12.2 60 1 0-21.13102 12.2Z M602.351017 151.801873a2.3 12.2 30 1 0 12.2-21.131019 2.3 12.2 30 1 0-12.2 21.131019Z'
				).attr({
					class: 'zan1',
				});
				svg.path(
					'M737.5 164.8c2.3 0 4.2 1.9 4.2 4.2v45.5c0 2.3-1.9 4.2-4.2 4.2s-4.2-1.9-4.2-4.2V169c0-2.4 1.9-4.2 4.2-4.2z M714.7 187.5h45.5c2.3 0 4.2 1.9 4.2 4.2 0 2.3-1.9 4.2-4.2 4.2h-45.5c-2.3 0-4.2-1.9-4.2-4.2 0.1-2.4 1.9-4.2 4.2-4.2z'
				).attr({
					class: 'zan2',
				});
				svg.path(
					'M270.2 222.6c5.9-3 8.8-9 6.6-13.3l-43.4-84.1c-2.2-4.3-8.8-5.3-14.7-2.3-5.9 3-8.8 9-6.6 13.3l43.4 84.1c2.2 4.3 8.8 5.3 14.7 2.3z M294.3 147c-3-5.9-9-8.8-13.3-6.6l-84.1 43.4c-4.3 2.2-5.3 8.8-2.3 14.7s9 8.8 13.3 6.6l84.1-43.4c4.3-2.2 5.3-8.8 2.3-14.7z'
				).attr({
					class: 'zan3',
				});
				svg.path(
					'M442.8 8.2c20.8 0 37.7 16.8 37.7 37.4S463.6 83 442.8 83c-20.8 0-37.7-16.8-37.7-37.4S422 8.2 442.8 8.2z m0 64.8c15.3 0 27.8-12.3 27.8-27.5S458.1 18 442.8 18 415 30.3 415 45.5 427.5 73 442.8 73z'
				).attr({
					class: 'zan4',
				});
				svg.path(
					'M367.4 187.6m-14.8 0a14.8 14.8 0 1 0 29.6 0 14.8 14.8 0 1 0-29.6 0Z'
				).attr({
					class: 'zan5',
				});
				var svg_g1 = svg.group().attr({
					class: 'zan_g1'
				});
				svg_g1.path(
					'M604.2 205.9c16.2 8.4 30.4 22.7 42.8 41.5 20.1 31.1 32.4 75.8 35 126.3 1.9 40.8-2.6 82.9-13 119.8h154.2c36.3 0 67.4 9.1 90.7 25.9 24 17.5 37.6 42.8 38.2 70.6v0.6c0 21.4-8.4 47.3-20.7 64.1 13.6 15.5 20.7 36.3 20.7 61.5 0 29.8-20.7 57.7-41.5 72.5 5.2 11.7 7.1 25.3 7.1 34.3 0 33.7-20.1 60.2-55.1 74.5 3.2 7.8 4.5 16.2 4.5 26.6 0 31.7-13 57.7-37.6 74.5-24 16.8-58.3 25.3-101.7 25.3h-246c-27.2 0-57.7-5.8-80.3-14.9-9.1-3.9-17.5-7.8-23.3-11-1.3-0.6-3.2-1.3-4.5-1.9-1.3 0.6-1.9 1.9-3.2 2.6-1.9 1.3-3.9 3.2-5.8 4.5-14.3 10.4-29.8 20.1-48.6 20.7h-66.7c-28.5 0-51.8-9.1-68-26.6-14.9-16.2-24-39.5-25.9-68.7l-30.4-324.5v-1.3c0-30.4 9.1-57.6 25.9-77.7 17.5-20.7 42.1-31.7 69.3-31.7H338c16.2 0 42.8-5.2 77.1-30.4 24-18.1 38.9-36.3 42.1-42.1 11-26.6 21.4-55.7 21.4-125 0-8.4 0-34.3 11-57 9.1-20.1 29.8-43.4 72.6-43.4 14.8 0 28.4 3.9 42 10.4z'
				).attr({
					class: 'zan6',
				});
				svg_g1.path(
				'M188.4 628.7c-7.9 0-14.5-6.2-15-14.2l-2.8-49.5c-0.5-8.3 5.9-15.3 14.1-15.8 8.3-0.5 15.3 5.9 15.8 14.1l2.8 49.5c0.5 8.3-5.9 15.3-14.1 15.8-0.3 0.1-0.5 0.1-0.8 0.1zM200.2 842.3c-7.9 0-14.5-6.2-15-14.2l-8.1-145.7c-0.5-8.3 5.9-15.3 14.1-15.8 8.3-0.5 15.3 5.9 15.8 14.1l8.1 145.7c0.5 8.3-5.9 15.3-14.1 15.8-0.2 0-0.5 0.1-0.8 0.1z'
				).attr({
					class: 'zan7',
					fill: '#ffffff'
				});
			},
		}
	}
</script>

<style>

</style>
